import Vue from "vue";
import Vuex from "vuex";
// 导入根getters
import getters from "./getters";
// 导入三个模块
import app from "./modules/app"; // 设置的更换
import settings from "./modules/settings"; // 配置的切换
import user from "./modules/user"; // 用户模块
import permission from "./modules/permission"; // 用户模块
import tagsView from "./modules/tagsView";

Vue.use(Vuex);
// 实例化仓库
const store = new Vuex.Store({
  // 没有根state,mutation,action,全部都是采用模块化开发vuex
  // 注册模块
  modules: {
    app,
    settings,
    user,
    permission,
    tagsView,
  },
  // 根getters
  // getters: getters,
  getters,
});

export default store;
